<!doctype html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <title>shell845 | archives</title>
</head>

<body id="home">
<div class="ui inverted masthead centered segment">
    <div class="ui page grid">
        <div class="column">
            <!-- Nav bar-->
            <nav th:replace="_fragments :: menu(4)" ></nav>

            <!-- Tags -->
            <div class="m-padded-tb-small"></div>
            <!--history-->
            <div class="ui top attached segment">
                <h4></h4>
                <h2 class="ui center aligned grey header">Archives</h2>
                <h4 class="ui center aligned grey header"><span th:text="${blogCount}">#</span> posts in total</h4>
                <!--divider-->
                <div class="ui horizontal divider"><i class="far fa-paper-plane"></i></div>
                <!---by date-->
                <th:block th:each="item : ${archiveMap}">
                    <h3 class="ui center aligned header grey" th:text="${item.key}">2020</h3>
                    <div class="ui fluid vertical menu">
                        <div class="item" th:each="blog : ${item.value}" >
                            <a href="#" th:href="@{/blog/{id}(id=${blog.id})}" th:text="${blog.title}">title</a>
                            <div class="ui olive basic left pointing label" th:text="${#dates.format(blog.updateTime,'MM-dd')}">03 Jan</div>
                        </div>
                    </div>
                </th:block>
                <!--divider-->
                <div class="m-padded-tb-small"></div>
            </div>
            <!--divider-->
            <div class="m-padded-tb-small"></div>
        </div>

    </div>
</div>


<!-- Footer -->
<footer th:replace="_fragments :: footer"></footer>

<!-- JavaScript -->
<th:block th:replace="_fragments :: script"></th:block>

<script>
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide');
    });

    $('#sponsorButton').popup({
        popup: $('.sponsorPopup.popup'),
        on: 'click',
        position: 'bottom center'
    });
</script>
</body>
</html>